<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>bind</title>
</head>
<body>
  <script>
    function demo() {
      console.log(this)   // window
    }
    demo()
    demo.bind({a: 1, b: 2})   // bind返回的是一个新函数   此处没有调用   所以控制台不会输出内容
    const x = demo.bind({a: 1, b: 2})
    x()   // {a: 1, b: 2}
  </script>
</body>
</html>